/*
 * LookIntoCursor.fx
 *
 * Created on Apr 12, 2010, 4:18:02 PM
 */

package fxgreader;

/**
 * @author perkintang
 */

import  java.awt.Toolkit;
import javafx.scene.Cursor;
import javafx.scene.image.Image;
import java.awt.Point;

public def VIEW_CURSOR = CustomCursor{
                                image : Resources.viewImage
                                name : "view"
                            };
public class CustomCursor extends Cursor
{
    public-read var cursorAWT: java.awt.Cursor;

    var image : Image;
    var name: String;

    init
    {
       def imageAWT = image.platformImage as java.awt.Image;
       def toolkit = Toolkit.getDefaultToolkit ();
       cursorAWT = toolkit.createCustomCursor (imageAWT, new Point (0, 0), name)
    }

}
